Mobile Service
Mobile service is the service backend for extension integration such as hubspot. It has a backend similar to a webphone service
I. Functionality
- Manage activity
- Manage agent
- Manage call log
- Manage contact
- Manage contact group
- Manage integration
- Manage template sms
II. Packages
1. Dependencies
- Await-to-js - A utility module which helps you to write async code more elegantly by avoiding try/catch Await-to-js
- Axios - Promise based HTTP client for the browser and node.js Axios
- Babel-core - Babel compiler core Babel-core
- Babel-plugin-transform-object-rest-spread - Compile object rest and spread to ES5 Babel-plugin-transform-object-rest-spread
- Babel-polyfill - Provides polyfills necessary for a full ES2015+ environment Babel-polyfill
- Babel-preset-env - A Babel preset for each environment Babel-preset-env
- Babel-register - babel require hook Babel-register
- Bluebird - Full featured Promises/A+ implementation with exceptionally good performance Bluebird
- Body-parser - Node.js body parsing middleware Body-parser
- Cors - Node.js CORS middleware Cors
- Cross-env - Run scripts that set and use environment variables across platforms Cross-env
- Dotenv - Loads environment variables from .env file Dotenv
- Express-device - Device detection middleware for Express Express-device
- Express-session - Simple session middleware for Express Express-session
- Express - Fast, unopinionated, minimalist web framework for node Express
- Fs - Node.js File System module Fs
- Jsonwebtoken - JSON Web Token implementation (symmetric and asymmetric) Jsonwebtoken
- Keycloak-connect-multirealm - Keycloak Connect middleware for Express Keycloak-connect-multirealm
- Keycloak-connect - Keycloak Connect middleware for Express Keycloak-connect
- Mkdirp - Recursively mkdir, like
mkdir -pMkdirp - Mobile-detect - Lightweight JavaScript library for detecting mobile devices Mobile-detect
- Mongodb - The official MongoDB driver for Node.js Mongodb
- Path - Node.js path module Path
- Redis - Redis client for Node.js Redis
- Socket.io - Node.js realtime framework server Socket.io
- Winston-daily-rotate-file - A transport for winston which logs to a rotating file each day Winston-daily-rotate-file
- Winston - A logger for just about everything. Winston
2. Dev Dependencies
- Chai-as-promised - A plugin to chai to easily test promises Chai-as-promised
- Chai-http - HTTP integration testing with Chai assertions. Chai-http
- Chai - BDD/TDD assertion library for node.js and the browser. Chai
- Mocha - Simple, flexible, fun javascript test framework for node.js & the browser. Mocha
- Morgan - HTTP request logger middleware for node.js Morgan
- Nodemon - Simple monitor script for use during development of a node.js app. Nodemon
III .Source tree
.
├── api.yaml
├── app.js
├── .babelrc
├── config
│ ├── access.js
│ ├── backendVersion.js
│ ├── host.js
│ ├── integration.js
│ ├── jwt.js
│ ├── logger.js
│ ├── mongodb.js
│ ├── redis.js
│ └── webphone.js
├── Dockerfile
├── .dockerignore
├── .env
├── .gitignore
├── index.js
├── keycloak.json
├── lib
│ ├── access.js
│ ├── integration.js
│ ├── pubsub.js
│ └── validate.js
├── middleware
│ ├── auth.js
│ └── integration.js
├── package.json
├── package-lock.json
└── route
├── activity.js
├── agent.js
├── call_log.js
├── contact_field.js
├── contact_group.js
├── contact.js
├── integration.js
├── session-iam.js
├── session.js
├── template.js
└── unauthenticated
├── calllog.js
└── integration.js
IV. Installation
- Clone project:
git clone https://gitlab.com/gcalls-opensource/gcallsmiddle.git
- Change dir into mobile-service folder to run backend
cd mobile-service
- Install utility modules:
npm install
Start server:
run in development
npm run devrun in production
npm install -g pm2
npm start